﻿using System;
using System.Collections.Generic;
using RRRSRoguelike.Properties;

namespace RRRSRoguelike
{
	/// <summary>
	/// Defines all game constants and assigns static values from resource files.
	/// </summary>
    public static class Constants
    {
        public static readonly Dictionary<string, ConsoleColor> ColorsDictionary = new Dictionary<string, ConsoleColor>
        {
            {"Black",ConsoleColor.Black},
            {"Blue",ConsoleColor.Blue},
            {"Cyan",ConsoleColor.Cyan},
            {"DarkBlue",ConsoleColor.DarkBlue},
            {"DarkCyan",ConsoleColor.DarkCyan},
            {"DarkGray",ConsoleColor.DarkGray},
            {"DarkGreen",ConsoleColor.DarkGreen},
            {"DarkMagenta",ConsoleColor.DarkMagenta},
            {"DarkRed",ConsoleColor.DarkRed},
            {"DarkYellow",ConsoleColor.DarkYellow},
            {"Gray",ConsoleColor.Gray},
            {"Green",ConsoleColor.Green},
            {"Magenta",ConsoleColor.Magenta},
            {"Red",ConsoleColor.Red},
            {"White",ConsoleColor.White},
            {"Yellow",ConsoleColor.Yellow} 
        };

        public readonly static int ConsoleHeight = int.Parse(Resources.ConsoleHeight);
        public readonly static int ConsoleWidth = int.Parse(Resources.ConsoleWidth);
        public readonly static int DungeonHeight = int.Parse(Resources.DungeonHeight);
        public readonly static int DungeonWidth = int.Parse(Resources.DungeonWidth);
        public readonly static int NumberOfSwords = int.Parse(Resources.NumberOfSwords);
        public readonly static int NumberOfMonsters = int.Parse(Resources.NumberOfMonsters);
        public readonly static string StepsImage = Resources.StepsImage;
        public readonly static string CursorImage = Resources.CursorImage;
        public readonly static ConsoleColor StepUpColor = ColorsDictionary[Resources.StepUpColor];
        public readonly static ConsoleColor StepDownColor = ColorsDictionary[Resources.StepDownColor];
        public readonly static string InvalidCommandText = Resources.InvalidCommandText;
        public readonly static string OKCommandText = Resources.OKCommandText;
        public readonly static string InvalidMoveText = Resources.InvalidMoveText;
        public readonly static int JumpDistance = int.Parse(Resources.JumpDistance);
    }
}
